Macaulay2 » Documentation
Packages » Python » PythonObject » PythonObject ^^ PythonObject
next | previous | forward | backward | up | index | toc

PythonObject ^^ PythonObject -- bitwise exclusive disjunction of Python objects

Description

Perform the bitwise exclusive disjunction ("xor") operation on Python objects.

i1 : toPython 6 ^^ toPython 3

o1 = 5

o1 : PythonObject of class int

If one of the arguments is a Macaulay2 object, then it is first converted to a Python object.

i2 : toPython 14 ^^ 7

o2 = 9

o2 : PythonObject of class int
i3 : 14 ^^ toPython 7

o3 = 9

o3 : PythonObject of class int

Caveat

In Python, the ^ operator corresponds to the bitwise xor operation. We use ^^ in this case for consistency with the rest of Macaulay2. The ^ operator is used for exponentiation.

See also

Menu

Ways to use this method:


The source of this document is in Python/doc/bitwise.m2:435:0.